/**
 * 
 * @authors Your Name (you@example.org)
 * @date    2016-08-18 23:28:34
 * @version $Id$
 */
var webpack = require('webpack');

module.exports = {
	entry: {
		//convert: './p_src/js/convert/convert.js',
		//feedback: './p_src/js/feedback/feedback.js',
		chat: './p_src/js/chat/chat.js',
		service: './p_src/js/service/service.js',
		thread: './p_src/js/thread/thread.js',
		//quickreply: './p_src/js/quickreply/quickreply.js',
		remark: './p_src/js/remark/remark.js',
		login: './p_src/js/login/login.js',
		bind: './p_src/js/bind/bind.js',
		label: './p_src/js/label/label.js',
	},
	output: {
		path : './p_bin/js',
		publicPath: 'http://127.0.0.1:8080/p_bin/js/',
		filename : '[name].js'
	},
	module:{
		// preLoaders:[
		// 	{
		// 		test: /\.js$/,
		// 		exclude: /node_modules/,
		// 		loader: 'jshint-loader'
		// 	}
		// ],
		loaders:[
			{
				test : /\.css$/,
				loaders : ['style','css']
			},
			{
				test : /\.less$/,
				loader : 'style!css!less'
			},
    	{ 
    		test: /\.(png|jpg)$/, 
    		loader: 'file-loader?name=../imgs/[hash:8].[name].[ext]' 
    	}
		]
	},
	//devtool: 'source-map',
	devServer: {
	  hot: true
	},
	plugins:[
		// new webpack.optimize.UglifyJsPlugin({
		//     compress: {
		//         warnings: false,
		//     },
		//     output: {
		//         comments: false,
		//     },
		// }),
		new webpack.DefinePlugin({
			'process.env.NODE.ENV':"development"
		}),
		new webpack.HotModuleReplacementPlugin()
	],
	resolve:{
		extensions:['','.js','.json']
	}
}